package com.wf.day_0612.test1;

import com.wf.day_0611.test2.MyThread;

/**
 * @author mpk
 * @since 2024/6/12 16:53:14
 */

//2.使用lock锁 使用2条线程打印1-10
public class LockTest {
    public static void main(String[] args) {


        MyLock myLock = new MyLock();

        Thread t1 = new Thread(myLock,"线程1");
        Thread t2 = new Thread(myLock,"线程2");

        t1.start();
        t2.start();

    }


}
